package main

import (
	"Go_gin_project/controller"
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	r := gin.Default()
	r.GET("/ping", controller.Ping)
	r.GET("/api/user/register", controller.Register)
	r.POST("/add", func(context *gin.Context) {
		context.String(200, "我是post请求用于增加数据")
	})
	r.PUT("/update", func(context *gin.Context) {
		context.String(http.StatusOK, "我是put请求用于更新数据")
	})
	r.DELETE("/delete", func(context *gin.Context) {
		context.String(http.StatusOK, "我是delete请求用于删除数据")
	})
	r.Run()
}
